package org.seamon.management.util.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author Simon
 */

@Getter
@AllArgsConstructor
public enum ErrorCodeEnum {
    SUCCESS(200, "成功"),
    UNAUTHORIZED(401, "用户未登录"),
    FORBIDDEN(403, "无权操作"),
    INTERNAL_SERVER_ERROR(500, "服务器内部错误"),
    TOO_MANY_REQUESTS(503, "请求次数过多，请稍后再试"),

    USER_ID_REQUIRED(10000, "用户ID不能为空"),
    USER_NOT_EXIST(10001, "用户不存在"),
    USER_PWD_ERROR(10002, "用户密码错误"),
    USER_USERNAME_EXIST(10003, "用户名已存在"),
    TOKEN_INVALID(10004, "token无效"),

    DEPT_ID_REQUIRED(10100, "部门ID不能为空"),
    DEPT_NOT_EXIST(10101, "部门不存在"),

    SMS_THIRD_PARTY_ERROR(10200, "短信第三方服务异常"),

    TASK_NOT_EXIST(10300, "任务不存在"),
    TASK_RETRY_COUNT_EXCEED(10301, "任务重试次数超过限制")
    ;

    private final int code;
    private final String message;
}
